package cn.s1995.sloth.bizs.service;

import cn.s1995.sloth.bizs.entity.Message;
import cn.s1995.sloth.bizs.enums.NotifyTemplateEnum;
import cn.s1995.sloth.bizs.oo.req.MessageREQ;

import java.util.List;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

public interface MessageService extends IService<Message> {

	/**
	 * 查询消息
	 * @param page
	 * @param req
	 * @return
	 */
	Page getReceivePage(Page page, MessageREQ req);

	/**
	 * 发送订单消息
	 * @param template
	 * @param uid
	 * @param orderId
	 */
	void sendOrderMessage(int template, Long uid, Long orderId);

	/**
	 * 发送订单消息
	 * @param messageEnum
	 * @param uid
	 * @param orderId
	 */
	void sendMsgForOrder(NotifyTemplateEnum messageEnum, Long uid, Long orderId);


	/**
	 * 发送视频消息
	 * @param messageEnum
	 * @param uid
	 * @param orderId
	 */
	void sendMsgForVideo(NotifyTemplateEnum messageEnum, Long uid, Long orderId);

	/**
	 * 发送消息
	 * @param templateId
	 * @param fromId
	 * @param toId
	 * @param type
	 * @param bindType
	 * @param bindId
	 * @param args
	 */
	void sendMsg(Long templateId, Long fromId, Long toId, Integer type, Integer bindType, Long bindId, Object... args);

	/**
	 * 消息批量已读
	 * @param ids
	 */
	void readBatch(List<Long> ids);

}
